<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/one.js"></script>
    <script>
        function fun() {
            var a = document.getElementById('username').value
            $.post('server','par='+a,function(data){
                console.log(data)
            })
        }
    </script>
</head>
<body>
<input type="text" id="username"  name="username" >
<button onclick="fun()">按钮</button>
<span id="span" style="color: red;"></span>

</body>
</html>